/**用户查询的区域树*/
var setting = {
		async : {
			enable : true,
			url :ctp + "/moduleController/moduleTree.shtml",
			autoParam : [ "code=moduleCode"]
		},
		data : {
			simpleData : {
				enable : true
			}
		},
		callback : {
			onClick : zTreeOnClick,
			onAsyncSuccess:onAsyncSuccess
		}
	};

function zTreeOnClick(event, treeId, treeNode, clickFlag) {
	setTagAndValue("form1","parentId",treeNode.code);
	searchData();
}
function onAsyncSuccess(event, treeId, treeNode, clickFlag){
	 var treeObj = $.fn.zTree.getZTreeObj("ztree");         
    var treenode = treeObj.getNodeByParam("code", "0", null);
    treeObj.expandNode(treenode, true, false, true);
}
$(function(){ 
	 $.fn.zTree.init($("#ztree"), setting); 
}); 

function inistalldepttree(){
    $.fn.zTree.init($("#ztree"), setting); 
}